

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>singularity cache clean &mdash; Singularity container 3.5 documentation</title>
  

  
  
    <link rel="shortcut icon" href="../_static/favicon.png"/>
  
  
  

  
  <script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
  
    
      <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
        <script src="../_static/jquery.js"></script>
        <script src="../_static/underscore.js"></script>
        <script src="../_static/doctools.js"></script>
        <script src="../_static/language_data.js"></script>
        <script src="../_static/js/ga.js"></script>
    
    <script type="text/javascript" src="../_static/js/theme.js"></script>

    

  
  <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
  <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  <link rel="stylesheet" href="../_static/css/custom.css" type="text/css" />
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="singularity cache list" href="singularity_cache_list.html" />
    <link rel="prev" title="singularity cache" href="singularity_cache.html" /> 
</head>

<body class="wy-body-for-nav">

   
  <div class="wy-grid-for-nav">
    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search" >
          

          
            <a href="../index.html" class="icon icon-home"> Singularity container
          

          
            
            <img src="../_static/logo.png" class="logo" alt="Logo"/>
          
          </a>

          
            
            
              <div class="version">
                3.5
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <ul>
<li class="toctree-l1"><a class="reference internal" href="../introduction.html">介绍</a></li>
<li class="toctree-l1"><a class="reference internal" href="../quick_start.html">快速入门</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security.html">Singularity安全</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../build_a_container.html">Build容器</a></li>
<li class="toctree-l1"><a class="reference internal" href="../definition_files.html">Definition文件</a></li>
<li class="toctree-l1"><a class="reference internal" href="../build_env.html">Build环境</a></li>
<li class="toctree-l1"><a class="reference internal" href="../singularity_and_docker.html">Singularity和Docker</a></li>
<li class="toctree-l1"><a class="reference internal" href="../fakeroot.html">Fakeroot</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../signNverify.html">签名和认证</a></li>
<li class="toctree-l1"><a class="reference internal" href="../key_commands.html">Key管理</a></li>
<li class="toctree-l1"><a class="reference internal" href="../encryption.html">容器加密</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../endpoint.html">容器仓库</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cloud_library.html">Cloud Library</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../bind_paths_and_mounts.html">路径映射</a></li>
<li class="toctree-l1"><a class="reference internal" href="../persistent_overlays.html">持久化Overlay</a></li>
<li class="toctree-l1"><a class="reference internal" href="../running_services.html">运行服务</a></li>
<li class="toctree-l1"><a class="reference internal" href="../environment_and_metadata.html">环境变量和元数据</a></li>
<li class="toctree-l1"><a class="reference internal" href="../oci_runtime.html">OCI运行时</a></li>
<li class="toctree-l1"><a class="reference internal" href="../plugins.html">插件</a></li>
<li class="toctree-l1"><a class="reference internal" href="../security_options.html">安全选项</a></li>
<li class="toctree-l1"><a class="reference internal" href="../networking.html">网络选项</a></li>
<li class="toctree-l1"><a class="reference internal" href="../cgroups.html">Cgroups</a></li>
<li class="toctree-l1"><a class="reference internal" href="../mpi.html">MPI应用</a></li>
<li class="toctree-l1"><a class="reference internal" href="../gpu.html">GPU支持</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../contributing.html">Contributing</a></li>
</ul>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../appendix.html">Appendix</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../cli.html">Command Line Reference</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="singularity.html">singularity</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_build.html">singularity build</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_cache.html">singularity cache</a></li>
<li class="toctree-l2 current"><a class="current reference internal" href="#">singularity cache clean</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#synopsis">Synopsis</a></li>
<li class="toctree-l3"><a class="reference internal" href="#examples">Examples</a></li>
<li class="toctree-l3"><a class="reference internal" href="#options">Options</a></li>
<li class="toctree-l3"><a class="reference internal" href="#see-also">SEE ALSO</a></li>
</ul>
</li>
<li class="toctree-l2"><a class="reference internal" href="singularity_cache_list.html">singularity cache list</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_capability.html">singularity capability</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_capability_add.html">singularity capability add</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_capability_avail.html">singularity capability avail</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_capability_drop.html">singularity capability drop</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_capability_list.html">singularity capability list</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_config.html">singularity config</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_config_fakeroot.html">singularity config fakeroot</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_config_global.html">singularity config global</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_delete.html">singularity delete</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_exec.html">singularity exec</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_inspect.html">singularity inspect</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_instance.html">singularity instance</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_instance_list.html">singularity instance list</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_instance_start.html">singularity instance start</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_instance_stop.html">singularity instance stop</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_key.html">singularity key</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_key_export.html">singularity key export</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_key_import.html">singularity key import</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_key_list.html">singularity key list</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_key_newpair.html">singularity key newpair</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_key_pull.html">singularity key pull</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_key_push.html">singularity key push</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_key_remove.html">singularity key remove</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_key_search.html">singularity key search</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci.html">singularity oci</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_attach.html">singularity oci attach</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_create.html">singularity oci create</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_delete.html">singularity oci delete</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_exec.html">singularity oci exec</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_kill.html">singularity oci kill</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_mount.html">singularity oci mount</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_pause.html">singularity oci pause</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_resume.html">singularity oci resume</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_run.html">singularity oci run</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_start.html">singularity oci start</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_state.html">singularity oci state</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_umount.html">singularity oci umount</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_oci_update.html">singularity oci update</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_plugin.html">singularity plugin</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_plugin_compile.html">singularity plugin compile</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_plugin_disable.html">singularity plugin disable</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_plugin_enable.html">singularity plugin enable</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_plugin_inspect.html">singularity plugin inspect</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_plugin_install.html">singularity plugin install</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_plugin_list.html">singularity plugin list</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_plugin_uninstall.html">singularity plugin uninstall</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_pull.html">singularity pull</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_push.html">singularity push</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_remote.html">singularity remote</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_remote_add.html">singularity remote add</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_remote_list.html">singularity remote list</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_remote_login.html">singularity remote login</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_remote_remove.html">singularity remote remove</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_remote_status.html">singularity remote status</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_remote_use.html">singularity remote use</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_run.html">singularity run</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_run-help.html">singularity run-help</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_search.html">singularity search</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_shell.html">singularity shell</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_sif.html">singularity sif</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_sif_add.html">singularity sif add</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_sif_del.html">singularity sif del</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_sif_dump.html">singularity sif dump</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_sif_header.html">singularity sif header</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_sif_info.html">singularity sif info</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_sif_list.html">singularity sif list</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_sif_new.html">singularity sif new</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_sif_setprim.html">singularity sif setprim</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_sign.html">singularity sign</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_test.html">singularity test</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_verify.html">singularity verify</a></li>
<li class="toctree-l2"><a class="reference internal" href="singularity_version.html">singularity version</a></li>
</ul>
</li>
</ul>

            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="../index.html">Singularity container</a>
        
      </nav>


      <div class="wy-nav-content">
        
        <div class="rst-content style-external-links">
        
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="../index.html">Docs</a> &raquo;</li>
        
          <li><a href="../cli.html">Command Line Interface</a> &raquo;</li>
        
      <li>singularity cache clean</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            
              <a href="https://github.com/sylabs/singularity-userdocs/blob/master/cli/singularity_cache_clean.rst" class="fa fa-github"> Edit on GitHub</a>
            
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="singularity-cache-clean">
<span id="id1"></span><h1>singularity cache clean<a class="headerlink" href="#singularity-cache-clean" title="Permalink to this headline">¶</a></h1>
<p>Clean your local Singularity cache</p>
<div class="section" id="synopsis">
<h2>Synopsis<a class="headerlink" href="#synopsis" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div><p>This will clean your local cache (stored at $HOME/.singularity/cache if
SINGULARITY_CACHEDIR is not set). By default the entire cache is cleaned, use
–name or –type flags to override this behavior. Note: if you use Singularity
as root, cache will be stored in ‘/root/.singularity/.cache’, to clean that
cache, you will need to run ‘cache clean –all’ as root, or with ‘sudo’.</p>
</div></blockquote>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">singularity</span> <span class="n">cache</span> <span class="n">clean</span> <span class="p">[</span><span class="n">clean</span> <span class="n">options</span><span class="o">...</span><span class="p">]</span>
</pre></div>
</div>
</div>
<div class="section" id="examples">
<h2>Examples<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>All group commands have their own help output:

$ singularity help cache clean --name cache_name.sif
$ singularity help cache clean --type=library,oci
$ singularity cache clean --help
</pre></div>
</div>
</div>
<div class="section" id="options">
<h2>Options<a class="headerlink" href="#options" title="Permalink to this headline">¶</a></h2>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="o">-</span><span class="n">n</span><span class="p">,</span> <span class="o">--</span><span class="n">dry</span><span class="o">-</span><span class="n">run</span>        <span class="n">operate</span> <span class="ow">in</span> <span class="n">dry</span> <span class="n">run</span> <span class="n">mode</span> <span class="ow">and</span> <span class="n">do</span> <span class="ow">not</span> <span class="n">actually</span> <span class="n">clean</span> <span class="n">the</span> <span class="n">cache</span>
<span class="o">-</span><span class="n">f</span><span class="p">,</span> <span class="o">--</span><span class="n">force</span>          <span class="n">suppress</span> <span class="nb">any</span> <span class="n">prompts</span> <span class="ow">and</span> <span class="n">clean</span> <span class="n">the</span> <span class="n">cache</span>
<span class="o">-</span><span class="n">h</span><span class="p">,</span> <span class="o">--</span><span class="n">help</span>           <span class="n">help</span> <span class="k">for</span> <span class="n">clean</span>
<span class="o">-</span><span class="n">N</span><span class="p">,</span> <span class="o">--</span><span class="n">name</span> <span class="n">strings</span>   <span class="n">specify</span> <span class="n">a</span> <span class="n">container</span> <span class="n">cache</span> <span class="n">to</span> <span class="n">clean</span> <span class="p">(</span><span class="n">will</span> <span class="n">clear</span> <span class="nb">all</span> <span class="n">cache</span> <span class="k">with</span> <span class="n">the</span> <span class="n">same</span> <span class="n">name</span><span class="p">)</span>
<span class="o">-</span><span class="n">T</span><span class="p">,</span> <span class="o">--</span><span class="nb">type</span> <span class="n">strings</span>   <span class="n">a</span> <span class="nb">list</span> <span class="n">of</span> <span class="n">cache</span> <span class="n">types</span> <span class="n">to</span> <span class="n">clean</span> <span class="p">(</span><span class="n">possible</span> <span class="n">values</span><span class="p">:</span> <span class="n">library</span><span class="p">,</span> <span class="n">oci</span><span class="p">,</span> <span class="n">shub</span><span class="p">,</span> <span class="n">blob</span><span class="p">,</span> <span class="n">net</span><span class="p">,</span> <span class="n">oras</span><span class="p">,</span> <span class="nb">all</span><span class="p">)</span> <span class="p">(</span><span class="n">default</span> <span class="p">[</span><span class="nb">all</span><span class="p">])</span>
</pre></div>
</div>
</div>
<div class="section" id="see-also">
<h2>SEE ALSO<a class="headerlink" href="#see-also" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p><a class="reference internal" href="singularity_cache.html#singularity-cache"><span class="std std-ref">singularity cache</span></a>   - Manage the local cache</p></li>
</ul>
<p><em>Auto generated by spf13/cobra on 12-May-2020</em></p>
</div>
</div>


           </div>
           
          </div>
          <footer>
  
    <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
      
        <a href="singularity_cache_list.html" class="btn btn-neutral float-right" title="singularity cache list" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
      
      
        <a href="singularity_cache.html" class="btn btn-neutral float-left" title="singularity cache" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
      
    </div>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2017-2019, Sylabs Inc

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.Navigation.enable(true);
      });
  </script>

  
  
    
   

</body>
</html>